<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/jq-1.12.4.js"></script>
    <style>
        #block {
            border: 1px solid black;
        }

        .block {
            width: 50px;
            height: 30px;
            background-color: blue;
            position: absolute;
            top: 100px;
        }
    </style>
</head>

<body>
    <button id="go">Run</button>
    <div id="block">Hello!</div>
    <hr />
    <div style="position: relative;">
        <button id="left">«</button>
        <button id="right">»</button>
        <div class="block"></div>
    </div>
</body>
<script>

    $(function () {
        $("#go").click(function () {
            $("#block").animate({
                width: "90%",
                height: "100%",
                fontSize: "10em",
                borderWidth: 10
            }, 1000, function () {
                console.log("动画执行结束")
            })
        })
    })

    $(function () {
        $('#left').click(function () {
            $('.block').animate({
                left: "-50px"
            }, 1000, function () { })
        })
        $('#right').click(function () {
            $('.block').animate({
                left: "+50px"
            }, 1000, function () { })
        })
    })
</script>

</html>